Crate phonenumber [] [src]

Reexports

pub use error::Error;
pub use error::ErrorKind;
pub use error::Result;
pub use country::Country;

Modules

country

Country related types.

error

Errors for various parts of the crate.

metadata

Phone number metadata, containing patterns, formatting and other useful data about countries and phone numbers.

Structs

Carrier

A phone number carrier.

Extension

A phone number extension.

Formatter

A formatter for a PhoneNumber.

Metadata

Phone number metadata.

NationalNumber

The national number part of a phone number.

PhoneNumber

A phone number.

Enums

Mode

Formatting modes for phone number.

Type

The phone number type.

Validation

Possible outcomes when testing if a PhoneNumber is possible.

Functions

format

Create a new Formatter for the given phone number.

format_with

Create a new Formatter for the given phone number using the given metadata database.

is_valid

Check if the phone number is valid.

is_valid_with

Check if the phone number is valid with the given Database.

is_viable

Check if the provided string is a viable phone number.

parse

Parse a phone number.

parse_with

Parse a phone number using a specific Database.